Refactor of algorithm to use Answer objects instead of strings