Lintian fixes and code consistency