Updated architecture of the lib