Add schemas code, second attempt.

removed the unused ones.