Cleaning up the GUI Code and fixing warnings, errors and other code smells.
Fixes esap-general#152 (closed)