Infer class of viewable in a more robust way