Add score and refactor