refactor Scanner a bit more (#135)