Refactoring: removed some unused stuff.
Refactoring: split traversal and render code.