refactor Tree viz code for Coge genome viewer integration