Nolonger using deprecated methods when creating model.