Refactor CustomLayout to handle events

Remove CustomController, because it was only functioning as an event system which CustomLayout can handle by itself
Refactor event handling to avoid tight coupling of different views and behavior