Refactor Node class - add extensions and relevant test cases