Moved more of the code into a .configure call