moved setParent nearer to setTemplate etc.
implemented renderSelf and its tests.
added renderParent to be used from render and destruct.