Changed Exceptions, fixed bug with Unicode strings