Added flags and mode parameter to defaults