Massive reworking of the library, see Changelog for details.