Day 6: refactored code to the model layer

This refactoring has several benefits over the previous code:

The logic to get the active jobs is now in the Model, where it belongs
The code in the controller is thinner and much more readable
The getActiveJobs() method is re-usable (for instance in another action)
The model code is now unit testable