Make code pep8 and jshint compliant