Added schema SQL.
Fixed a little bug.