Working with two model types

The plotting functions need to be tweaked, but the rest is ok for now