Code cleanup and static analyser warning suppression