Added jslint and acted upon suggestions