Refactored node.py to fit the PEP 8 style guide.