Edgemodels

this is probably way too much code - how can we make this more concise but keep the overall structure strong?  @ifjorissen @MDCox