Adding ping.php and fixing some weird problems.