fixups for config and add tests