touch-ups from Twan's code review