Made major changes to code structure
added controller base