Loads of lib rewrites for new schema