move library stuff to a separate project