Initial split into library