Made TreeQueue easier to maintain
Added threading wrappers for experimentation