remove various warning
better loop and other PhGraphic amelioration