Refactor tree graphics