Add code to parse stream objects and refactor hex/octal character scanning slightly.