Added support for creating app instances