Added task priority levels; fixed a bug where bqt_out could become invalid if an exception was thrown during initialization