chore: refactored NiftyNodeInputHandler and corresonding unit tests