Working version with new schema, except for subs.