Added handler class to update GUI instead of doing it from the GUI class