Fix errors in documentation and add defining functions and macros
Merge branch 'develop'