Added comments for readability.
Refactoring.
More refactoring and code cleanup.
Changed to fix small GUI problems which closes #4
Changed to fix small GUI problems which closes #4