Refactor common code
WIP on 4 problem
WIP on 4 problem
New scoring function and interface