UI improvements / code cleanup.
Sweet new event system implemented (only used for layer events for now).
Layer event handling improved.