Refactor to new application group model