various testing and changes
merging test code from main and changes to sorted-list.c