JS minification, plus some bug fixes