Fixed failing unit test added XML for log4j. 
- other minor fixes
Fixed some unit tests.