Finalizing project detail page

Also includes some small refactorings on JS