provided better cli handling, add run method

(unref/detached dont work)