Simplify queue reading/writing.