Fixed duplicate groups, added some config settings