Changed simulation from global to local. Created graph generator script as top level document.