Revert "Improvements from linaro"

This reverts commit 35c82e292aab1d347f6d2742a5a540fad881e2e7.