improve top-down readability

functions done, keep defined after ghapi, htget