Changes:
 - minor bug fixes
 - minor output formatting fixes
 - code revisions in preparation for Android 12