Refactor lib's str/trm readers
Add expect-num-of-frames helpers in tests
Fix typo in browser example README