Added input-validation for the GUI - fixes #5 partially