Implemented a graceful disconnect and did some UI clean up

@davidfowl @mikary @abnanda1 
Don't initialize class fields to default values.