Move the DBConnector class from model to controller