add curved arrow force plot
Clean up the JavaScript so that it is suitable production quality code.