Cosmetic refactoring of the whole library.