Reordered constructor arguments.
diff --git a/barrier_test.go b/barrier_test.go
index 8a9e0e5..a4e5904 100644
--- a/barrier_test.go
+++ b/barrier_test.go
@@ -3,7 +3,7 @@
 import "testing"
 
 func BenchmarkBarrierLoadSingle(b *testing.B) {
-	barrier := NewBarrier(NewCursor())
+	barrier := NewCursor()
 
 	iterations := int64(b.N)
 	b.ReportAllocs()
diff --git a/example/main.go b/example/main.go
index a66869d..c44a5c7 100644
--- a/example/main.go
+++ b/example/main.go
@@ -23,9 +23,9 @@
 
 	written := disruptor.NewCursor()
 	// writeBarrier := disruptor.NewSharedWriterBarrier(written, RingSize)
-	readBarrier := startConsumerGroups(written, written)
-	// writer := disruptor.NewSharedWriter(writeBarrier, readBarrier)
-	writer := disruptor.NewWriter(written, RingSize, readBarrier)
+	upstream := startConsumerGroups(written, written)
+	// writer := disruptor.NewSharedWriter(writeBarrier, upstream)
+	writer := disruptor.NewWriter(written, upstream, RingSize)
 
 	startExclusiveProducer(writer)
 }
@@ -54,7 +54,7 @@
 	for i := 0; i < MaxConsumersPerGroup; i++ {
 		read := disruptor.NewCursor()
 		cursors = append(cursors, read)
-		reader := disruptor.NewReader(upstream, written, read)
+		reader := disruptor.NewReader(read, written, upstream)
 
 		// constant time regardless of the number of items
 		//go consume0(disruptor.NewSimpleReader(reader, NewExampleConsumerHandler()))
diff --git a/reader.go b/reader.go
index f27e8d7..e60ff31 100644
--- a/reader.go
+++ b/reader.go
@@ -1,16 +1,16 @@
 package disruptor
 
 type Reader struct {
-	upstream Barrier
-	written  *Cursor
 	read     *Cursor
+	written  *Cursor
+	upstream Barrier
 }
 
-func NewReader(upstream Barrier, written, read *Cursor) *Reader {
+func NewReader(read, written *Cursor, upstream Barrier) *Reader {
 	return &Reader{
-		upstream: upstream,
-		written:  written,
 		read:     read,
+		written:  written,
+		upstream: upstream,
 	}
 }
 
diff --git a/shared_writer.go b/shared_writer.go
index ddb66f9..ef8a2fb 100644
--- a/shared_writer.go
+++ b/shared_writer.go
@@ -8,19 +8,19 @@
 	mask      int64
 	shift     uint8
 	committed []int32
-	upstream  Barrier
+	read      Barrier
 	written   *Cursor
 }
 
-func NewSharedWriter(shared *SharedWriterBarrier, upstream Barrier) *SharedWriter {
+func NewSharedWriter(write *SharedWriterBarrier, read Barrier) *SharedWriter {
 	return &SharedWriter{
-		capacity:  shared.capacity,
+		capacity:  write.capacity,
 		gate:      InitialSequenceValue,
-		mask:      shared.mask,
-		shift:     shared.shift,
-		committed: shared.committed,
-		upstream:  upstream,
-		written:   shared.written,
+		mask:      write.mask,
+		shift:     write.shift,
+		committed: write.committed,
+		read:      read,
+		written:   write.written,
 	}
 }
 
@@ -31,7 +31,7 @@
 		wrap := upper - this.capacity
 
 		if wrap > this.gate {
-			min := this.upstream.LoadBarrier(0)
+			min := this.read.LoadBarrier(0)
 			if wrap > min {
 				return InitialSequenceValue, Gating
 			}
diff --git a/writer.go b/writer.go
index e391661..093f8c0 100644
--- a/writer.go
+++ b/writer.go
@@ -1,22 +1,22 @@
 package disruptor
 
 type Writer struct {
+	written  *Cursor
+	upstream Barrier
 	previous int64
 	gate     int64
 	capacity int64
-	written  *Cursor
-	upstream Barrier
 }
 
-func NewWriter(written *Cursor, capacity int64, upstream Barrier) *Writer {
+func NewWriter(written *Cursor, upstream Barrier, capacity int64) *Writer {
 	assertPowerOfTwo(capacity)
 
 	return &Writer{
+		upstream: upstream,
+		written:  written,
 		previous: InitialSequenceValue,
 		gate:     InitialSequenceValue,
 		capacity: capacity,
-		written:  written,
-		upstream: upstream,
 	}
 }
 
diff --git a/writer_test.go b/writer_test.go
index 1ddf00e..46cfeb3 100644
--- a/writer_test.go
+++ b/writer_test.go
@@ -3,7 +3,7 @@
 import "testing"
 
 func BenchmarkWriterCommit(b *testing.B) {
-	writer := NewWriter(NewCursor(), 1024, nil)
+	writer := NewWriter(NewCursor(), nil, 1024)
 	iterations := int64(b.N)
 	b.ReportAllocs()
 	b.ResetTimer()
@@ -17,7 +17,7 @@
 	read := NewCursor()
 	written := NewCursor()
 
-	writer := NewWriter(written, 1024, read)
+	writer := NewWriter(written, read, 1024)
 	iterations := int64(b.N)
 	b.ReportAllocs()
 	b.ResetTimer()
@@ -32,7 +32,7 @@
 	read := NewCursor()
 	written := NewCursor()
 
-	writer := NewWriter(written, 1024, read)
+	writer := NewWriter(written, read, 1024)
 	iterations := int64(b.N)
 	b.ReportAllocs()
 	b.ResetTimer()