Commented

Added group function test and added comments on most things.