Made a main js file and made the flowchart as a class (function in javascript ofcourse)