reorgnize and support doT template settings