Some shorten code
Some shorten code and optimize:
include/flag.h, src/flag.cpp