Moved more stuff to the library