Rebase on upstream

Updates to GUI (more than just a connect button), added shared preferences.