Add schemas code, second attempt.

Fixed. this was a problem in a previous version, no longer.