Fixed JSHint errors and mixed indentation.