PEP and jslint fixes