Added service layer to handle cahcing and models from database to api