Refactored code for collaborative coding, added plotter