moving lib stuff to a lib dir