moved logic from commands to proxy.js, storage is small enough to live there too.
added selection types to some commands that operate on named profiles