Merge PR #4617, GUI refactor

Merge PR #4617, GUI refactor