Add scanr function, last exercise.
Improve code a bit, less matching.