Code cleanup, introduced connection window and connection command-line argument.