more cleanup + added gpl headers to php files