slightly less hokey hand-rolled options parsing