Code cleanup

I think we’re good to go for history.php now.