Fixing regressions introduced with JSHint & Stylus, and code clean-up