Add basic factions code