Refactored indexing functions of the Diesel models.

parent 6996759d