Fixed all the commands - Pass 3 - FINAL
Also removed redundant imports and cleaned up the code