fixing bug when reddit url has .JSON
optimizing some stuff
yuck. parsing reddit urls is not fun