added connection.xml for changing ip/port number
added connection.xml file parsing for connection settings and cleaned up code