Calculate costs during move search
Restructure unit test to test debt handling too