Clean up code, calculating scores, add to preference working