Cleaned up php scripts