fixed JSHint errors and improved JSHint coverage