Refactor Department Management using Spring and Angular.js