Invite emails related fixes.
Updated tests.
Fixed style.
Merge pull request #23 from matiasb/last-minute-fixes

Invite emails related fixes.