Added destructors. New unit test passed confirming updating algoritm working.