Fix errors in documentation and add defining functions and macros