Minor rewrite of variableFactory interfaces. Minor bug fixes.