Started with controller structure

Main controller is there. Tried to comment a lot so everyone understands
what it does.