Minor changes to API (new attatchStream method) and typo mistake corrected.