Refactor to remove duplication between left and right side inserts
Allow comparison of nodes using Comparable mixin