Set flags and options