State events are now emitted from the layer too fixes #87