modular graphutil.js that produces force-directed graph