Clean up static analyser errors