some optimizations (thanks to !cakes profiler!)
BEWARE OF THINGS BREAKING!!!
Merge branch 'master' of github.com:CapsAdmin/pac3