Adding SortBy and re-organizing code to follow Underscore.js