Add a lot of little fixes from Streamparse fix/major branch.