Revised test structure and added more detailed tests.