removed table index from env constants, registering gui service with cmdthreader.