Updated optimization flag to -O2