* refine class design and inheritance first version code * fix all typos --------- Co-authored-by: xuyang1 <xuyang1@microsoft.com>