factored out library code from cli command
moved powerusb to powercli
recovered library code from older commit
recovered library code