minor style and structural changes