Start implementing MetadataQuery interface

* also did go fmt and erased some trailing whitespace