Using events to activate layers when created

Also working on the active layer list