Added the field defaultConnection to the Main and fixed the main tests
accordingly