Some light cleanup and reorganization.