Implemented departments
Fixed some department bugs