refactor 1
refactored all of javascript for recommendation list sorting