Declared the wrong function as static.

Also added a test for length.