This is the main part of the library.