reorg for in-code module import
solid interface for both cli and importable module
return content_type as well