reader refactoring

reader refactored to be more like interface with virtual functions