Rewriting step 1
Refacotoring commands.