Added an easy way to add flags, made code more self documenting