Moved layers and controls to init function