Minor code formatting, commenting and cleanup.