Theoretical and implementation improvements for difference evaluation functions