Personalization

@Berdir asked specifically to review this branch, please leave the merging to him.
Why does the upcast no longer work? It was upcasted before in buildform(), now it is not anymore?