Updated options parsing

Options parsing now uses the OptionParser library, which makes things
very nice.