Add DeactivateNode function and general cleanup

Signed-off-by: Ken Barber <ken@bob.sh>