Refactored (a bit) the apply method
Null-safety for node bindings
Use Java8 iteration on collections