Clean up php code