Add copy function and refactor codes in member-table