Basic EAPI5 compatibility.
Fix modes a number of files.