Some final performance optimizations, there's hardly anything left to speed up at this moment