refactored leader and tests
refactored NodeContainer