Refactor answer marking.