1) Now using the prefixMatched method in validator method. I wrote it - why not?
2) Fixing a bug in getPrefix - cannot naively assume that number will have more digits than specified in parameter k.