Delinting with several associated bugfixes.