1) Refactored code to PEP 8
2) Add argparse
4) Remove ununsed imports
3) Catch exceptions if wrong command is run