Implement Active Record as the model layer