Layout changes and some code cleanup.