Final style changes and some code cleanup