Separated JS from the jade files into public javscript