Rewrite of apps core foundation