Adding code refactoring, based on all observation made over last pull

This changes are meant to fix all observation done over the pull request https://github.com/jafi666/pyCommander/pull/5

Please review if they are good now so I can push this changes to IterationOne branch and then they can pass first request to merge all to master.
It is necessary to have unit test for this