fixes most JSLint problems