Merge 2.10.x to master

The main area of conflict was `build.xml` (refactorings/bug fixes from 2.10.x + modularization from master).

Review by @adriaanm