refactored controllers

controllers are moved to separated modules, instead of being hard coded
into views