cleanup and refactoring of test target