More tests and fixes after new schema.