Add schemas code, second attempt.

I like it better this way.