Refactor code for futures and add GroupsNormalizer class