Revert O3 and add more build tweaks