several changes to php scripts