From structure oriented to object oriented scanner design