CommandStack: small refactorings
CommandStack : separate into separate files