Implemented unittest for testing and plotting (test.py and testplot.py)