Fix warnings from 'make minify' + other bugs