Added more base code for layer management. Changed structure of layeredconsole though. Breaks serialization.