Add schemas code, second attempt.

noted. You can rewrite it when I'm done.