Separated controller, added tests for exposed methods
Merge branch 'calendar'

Merging master with calendar for updated code.