Add JSHint and refactor
update testing