Fixed release build. Moved code to toolchain.