Modified Type class as old version turned out to be crap.