General cleanup and restructure.