Need to initialize sorted to NULL or the free in the destructor will crash if ready never called.

(Should also initialize limit, to avoid warnings from good compilers about members that are not initialized by constructor).