index.php code cleanup, style tweaks