Added factions support