some more stylistic changes and clean up