Fully reset connection on disconnect/error. Fixes #30
JS Scoping is strange, Fixed #30
Wait before trying to reconnect
Fix formatting
Fix Tab spacing
Merge branch 'pr/31' into develop
Correcting format of pr/31