ll: Move length-related definitions to ll.h
examples: Use AD structures in examples