Added Linaro optimizations with some fixes