Trying to become friends with regexps. And some other small changes.