Issue #269 - Cleaned the times controller

Moved data processing to model
Cleaned model