Ran code though JSHint and fixed several errors but still have a lot more to do