Fix types, namespace, CLI