A few small tweaks and check-ups to improve code sanity

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