factored out node.type !== 3 stuff
formatting
made prompt stuff less stupid
.on() and .emit()
executing commands