fix data input

Cleanup input framework for data reading