Added console node.
Various other refactoring and improvements.