Added multi-application support