code cleanup, minor style changes