Some crazy optimizations