Add length functions.
Add generic dispatch functions.