Gave up on the matching bug. Should be close enough anyway. Finished writing training (untested), will test as part of initialization (also started).