Tidy up test mode and check for duplicate group in config