cleanup and restructure.