Added -O3 optimizations