Updated scanner implementation