Updated connection logic, added settings.xml file