Remove unused typecasters

This PR removes a couple of functions that we don't use.