FIX get rid of global state
CHANGE console logging level to DEBUG