Removing print statments and converting it for the GUI