Added controller class to talk to database