Revert macro-related commits. Macros bring much more complexities than manually implementing the functions