Fixed reconnect if port closed. Added settings system which allows a
system of defaults and an ability to override.