Move ApplicationServices to Foundation. Fix #393.