massive cleanup and reorganization