Adding three stripes flags and refactoring.