improve handling of uids at restore time, simplify entity prototypes, fix vote calculation when cold