clean up php code