refactoring code + cleanup Experimental cmdline