added connection state indicator, minor style fixes