introduced statelayer functionality
- the statelayer is the layer that will receive the states
always listen for click events on the body
this way, ghost clicks can be prevented. If clicks are only listened to on the layer = element itself, a ghost click that is fired, after the element has been removed might get lost