Add schemas code, second attempt.

Wow, I didn't know that. Is that described anywhere?