Implement upgrade and delete zan library