Move to app factory instead of singleton instance.