Clear warnings and more cleanup