More opitimizations