Added more schema code and tests