Just some speed optimizations