Updated after review
Refatored toCVType