Add schemas code, second attempt.

Should probably just be all on one line.