general code cleanup preparing for release