Performance adjustment and some jslint cleanup