Format changes and a bit of code cleanup