Refactor search and update node methods. Fixes #3, fixes #6