Refctor app init, runtime expose