Move some profile stuff to NDK and fix some bugs in the executive implementation...