Clean up PHP code