Refactored controllers

Made controllers mockable
Merge pull request #1 from mattdotmatt/Routing

Refactored controllers