fix issues w/ key handling and more thorough uri testing