Revert "Revert "GUI, clean main and other minor changes""

This reverts commit 5de9401860f25ce4f56576ba30d062aa98a0d8cb.