Fleshed out model and repository layer