Refactor a generic controller from project and investigation controller