Script was dependent on variables added by Django. Revert "moved long script form base.html to own file"

This reverts commit 73a568dbac8f995767a128ec73355413b907d36e.
Merge branch 'master' into dev
added a few minor things
finished implementing custom request type management tools
minor update
fixed merge conflicts