Modularization and redesign. Support streaming api
Merge