MongoDB pipeline now implemented.