Created a module for executing ssh commands. Refactored code.