moved some common functionality between subcommands into the subcommand module, started working on attaching and detaching nodes, attaching nodes is working