reorganizatoin and cleanup