Cleaned up extra's and added a reconnect loop.