Fixes for refresh refactoring

fixes error on Android (hopefully, that is).
Also provides the groundwork for a "UI refresh" mode.
Some small not directly related fixes in the mix, too.