Fixed code back into the master repository

Fix all bug on testcase.
Update code.
Change schema.sql.