Added GPL headers and replaced tests with assert() for positions in list_xxx().