Remove hash and query variable and write tests.