Cleaned up rank-groups.lua and changed to new message system.

Also fixed missing eof newline.