Fixed another bug in layer, reworked recorder construction.