Even more optimizations (courtesy of atom)