cleanup and added documents

cleanup and added documents

renamed define- to add-, and undefine- to remove-

changed global variable and global enum

removed struct internal-link-symbol

fixed top-level compilation,
fixed unused-tag warnings