Move custom JS into a seperate file, put options for blueimp Gallery in correct place
Some slight improvements to preview.py