Refactored code, added inspector buttons to create/delete/cycle layers.