Additions and more code cleanup.