remove dispose method in favor of close method
Added clearAll methods
added test cases for clearAll methods