commands dictionary initialization refactoring