fixes to make easier to compile on max os x.
fix printf compiler warnings
misc/various bug fixes.
fix canonical redir url bug with iframes.
minor bug fix
more minor bug fixes.