Group invitation fixed. 
Some refactoring done.