small fixes to the model and routes