Built the delete app function.