Linter improvements

This resolves parts of #871.