Fix bugs. Use JSHint