Clean up and restructure