code cleanup
enhance stability
modify data buffer to context stream
add table model