Move casting operations out of RT
WIP