fixed the stats redirect loop
Uncommented a few lines
fixed all the bugs I sent out in the email