cleanup defaultvalue.hpp. reduce duplication.