Moving length function to base lib, more stuff in misc.scm