Refactored ses. Preparing to include other commands than run