added the URI library
implemented state saving via ?query=