Fix tests failing on scoped_records missing
Clean up a bit