More cleanup and restructure.