Full review (do not merge)

Should be fixed in f346a08000754eb99a.