Parsing improvements

- Now stream can also be parsed.
- Multiple definition of same namespace can now be handled.