Added sorting to gadgets based on upvotes and downvotes.