Updating GUI, connecting GUI with JSON writer.