Clean up and some actual structure