Replace 'else' by 'else if' and fix whitespace mistake
Remove unused property 'nodeId'