fix #352 also did major remove and destroy refactoring, and added lots of unit and visual tests