Refactor code

Add debug flag to DelayedTest.
Ignore MultiKeyValueTest.testReferences as it does not succeed with maven
test for now.
Cleanup a bit of example code.