split app and library