send query parameters in prologue if present
remove unused template function

This clears one of the annoying intellisense bugs.
rename adopt -> try_adopt and add adopt function

Also updates a few things to play nicely with client side.