Refactor macro module with SyntaxTree

This is a series of refactor and should give us cleaner codes.

ctypes_binding module and variable names will be updated later to keep
this change smaller.