Minor tweaks to reduce memory garbage

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>