Fixing warnings and following lint suggestions