add coverage analysis script
reorder test layout
removed some memory leaks
eliminate an off-by-one error
check close instead of equal for floating point value
relax test conditions because floating point accuracy is not sufficient
remove some includes
code cleanup
move to new test structure