refac config stuff