Cleanup and restructure.