Refactor to simplify scoring logic