cleaning up php statements