Switched to pipeline design
Merge branch 'rewrite'