Bug fix (null pointer exception)
added simplified "layermanager"