fix roles and add missing tests
Fix build warnings
Merge pull request #193 from remicollet/issue-0045

Various fix for 0.0.45
fix incorrect usage of macro