Neaten builder with network handling function

Wraps up some of the code that was scattered in the builder to do with preparing the model for building.