Remade the model to avoid exposing internal classes.