Slightly better optimizations