minifying and bug fixing