Optimized and improved tests