Porting tut2 and tut4 examples to the new declaration syntax instead of XML