Tidy up rec_layer.h. Add some comments regarding which functions should be