Added new fields to stream def and refactored test code