Add schemas code, second attempt.

Because I hate implicit conversions.