Remove duplicate code from Project