[mt1032] Fix group invite and some code cleanup