Small optimizations

Thanks to https://github.com/driskell