Continue fourth version of project. Refactoring test cases and add test cases.