Added binary handling.
Fixed handling of binary data