Unit test

add unit tests
+fixes in code to fix founded problems
Add XML window

empty ^^