code cleanup while reviewing
merged with master
r# doesn't seem to give warnings on this...