Completed adding support for schema 0; Added more unit tests