Refactor scoring method into something easier to read.