Reorg strand code into struct