Fixes first issue (repeat code in flags, maintenance issue)