Factor graph, create variable nodes
Added method createVariableNodes
Edited createVariableNodes method