removed CF debug messages and moved global variable definition