comments for Commands and refactoring for readability.