Clean comments and implement some suggestions from cppcheck.
imageGUI: add error messages.
imageGUI: add remaining error message and clean comments.
imageGUI: delete commented code.