Minify events better and cleanup