Re-structuring and cleanup