refine code of schemas and setup unit test folder

refine code of schemas and setup unit test folder