project_detail_index code refactored for readability