Re-added optimizations