Cleanup and reorganization