Populating the tables and add the controller main