Cleanup code to conform to coding standards

use jquery's jshint settings for javascript, and use pep8 and pyflakes
for python.