Add flags and mode options in Environment constructor