Added JS library references and d3 test code in external JS file.