Command mode is working again
Refactoring
Actions refactoring