Adding schema tests and fixing bugs in ddl operations