Added util methods for external apps, and an interface for "app".