Merge Ernesto's svn commits

This PR replaces #35.