Add flag class. Add missing license headers.