Improved warnings implementation