Separated controller, added tests for exposed methods