Pa argsparser

I have written a pretty comprehensive argument parser to get this started, please review and merge.