Moved stuff to the library