clean up and add ed viewer