added get_group_submission_code, added some comments, did pep8 refactoring