getopts, rough fixes. Works for HPR feed =D