Added Pipeline model, relationships and calculations