Fixed some missing var initialization.
Added WriteBytesToStream method to allow streaming byte arrays instead of NSData instances.