Additional cleanup and restructure