Clean up stack queue implementation.