Reorganize and cleanup