CommandParser refactor