improved minimization and added sourcemap