Revert "GUI, clean main and other minor changes"

This reverts commit 0a2505dba3326ddeba08f05c4add0fec1827209d.