add player registry, fix unit tests