Cleaned up some javascript (jslint)