Added better options parsing