minor style changes and code formatting