Moves libraries to a structure that makes sense.