Another large refactoring of double well code. Almost to the point where everything is compartmentalized.