Code cleanup and starting SelectDepartment tests
Changed ApplicationController so that the RepositoryFactory is always passed. Made that value available to the other controllers so that we do not have to use the local _repositoryFactory in each controller. Just RepositoryFactory.