Rewrite ValueBase to work with Type class