Migrated and generalized fGTS Gamestats logic to external library.