Move casting into more responsible class and spec