Adding tests on the api part.
Adding tests on the multi-method.
Formatting
Minor formatting
Cleanup and adding tests.
Move query routine inside the query namespace and adding tests on it.
Doc
Remove dead code