cleanup, addition of optional graphics window