refactored controllers into controller spackage