Minor allocation tweaks

A handful of small changes to reduce allocations in the main loop.

These were found via profiling, so whilst only small tweaks they should net a nice 2-3% saving in memory allocations each tick. Plus a little CPU too I should think.