Cleaned up PHP script.