Added namespace support, with test cases