added managerfactory, converted playermanager to use it