Implement models, functionality nearly finished