Module for exapndable nodes, and some code simplification