Separate group logic into own file.