Optimized and removed need for gnu99 flag