added tests, some benchmark, and by default whitespace is compacted a little
handle nil map lookup