Finish refactor of recommendation handler