Issue #926: code cleanup + minor UI fixes