Patch Set 2: I would prefer that you didn't submit this

(5 inline comments)

- I see lot of CoreExceptions when running ui tests
- remove debug println all over the place, in some places you may want to replace it by debug trace output which can be switched off
- all TODOs need to be fixed