Fixed #8, added JSHint
Fixed all JSHint errors, finishes #8