Massive code reorganization
Changed to using a disk backed queue, and a disk backed sorted list
Changed to better testing framework.