Updated library code