fixed memory leak and iterative_test
Merge pull request #2 from wjmelements/wnet

fixed memory leak and iterative_test