style: code cleanup

This is mostly cleanup. Only a couple of small changes that could (marginally) improve perfs.

I still have problems running the test suite locally, Travis, what do you think ?