And some more beautifications and pep8
Fix the bloody jQuery mess