getopt is now used to handle command line arguments.

Also moved functionality of the -p option to -h, and renamed -pw to -p