Little optimizations here and there