Reestructured the lib