Code clean up and cruft removal.