add more explicit docs
fixed an inverted test, robustify key-value string parsing