More queue points work.
Fixed major bugs in sql system.