Improved the initialization of the streaming code;
Removed unused defines.