Put full functionality inside the lib