minor style changes, code cleanup