GCC builtin optimization. Code simplifications and polishing.