Changed the way faction relations are stored in the database