Added commands and formatted Python source according to PEP8.