add codox, make metric retrieval a public function, still working on a better json api