Touches up some security issues in index.php