Fix typos in comments, remove trailing ?> in some php files