JSHint errors rectification