Add helper to add new nodes before/after nodes in a list