Add library code