FIXED: conflicting header issue

// Refer to the commit messages for detail
fixed duplicated and conflicting header issues
&& added documentation
&& minor formatting