Add "use strict" to most JS functions, reformat tree table code, update phMagick to latest