added small improvements to the code, mostly refactoring
fixed command handling and accidental deletion of shell prompt
Merge pull request #3 from blidarescub/refactoring_improvements

Refactoring improvements