Some code cleanup, lowercase parsing in trending