Added a Controller, to abstract the interaction between the requests and the databse