adding tests in clean target and refactoring test main