Merge master's changes in xml branch

Everything is not perfect* but it's a good start. I'll continue to push fixes after that.

* I lost tipsy and the shell scripts aren't good anymore.