Extract options parsing to separate class