added faction colors, improved efficiency, other updates