Revert "code optimizations"

This reverts commit d35b847bb0a7f93cb91bf7e76d72040e89fbad57.
Revert "Build kernel using gcc-4.9"

This reverts commit 8270b121d29d8888f6e34c3b4437cb1ce928a164.