Move manage project code into controller