XP-gain counter.
Makefile fix.
Bugfix. TESTS ARE FAILING!!!