Feature #46, refactored controllers for testing purposes