Optimizations and libraries