Refactor computing dependent type vars