Fix tests: Lazy-load config, follow moved fns
Slightly better URI encoding/decoding