Various bug fixes with projects.php

Projects.php is just like the last one, it's gonna be pretty big. But no
problem, I'll cope.