Added the model for the departments, plus modified all of the sql to reflect that.