Optimized things a bit