Cleaned up some python. Added support for subcommands.