Fixed a problem with handeling the unknown child exception
Added the option to enforce the encoding
Updated the tests and moved some files