Fixes registration of external commands.
Remove debug comments.
Remove unnecessary lines and correct variable scope
Merge pull request #88 from hybridgroup/134-fix-ext-cmds-reg

Fixes registration of external commands.