Replace code by lib.