Replace some globals with library specific static variables
More rdebug