code cleanup: index.php now has no sql in it.
general cleanup.