Node to code ports

Had commented out processing of code for state changing. forgotten to un-comment it.