Packaging cleanup and bug fixes to Search.getQuery