Object factory for node.js and neo4j