added namespace support and multiple applications