Updated model
Fixed tests, updated api and interfaces, added basic Pipeline implementation