Moving (potentially) wildly dangerous RPC query handlers out of libs folder