Restructured and improved high-level app framework.