Preliminary patch of https://0xdata.atlassian.net/browse/HEX-1319

The code need better handling of scoring.