cleanup options parsing