namespace support

also cleaned up some reference names