minor style fixes & regrouping