Added comments and checks on command line arguments.