removed a bunch of global variables. verify roc-number inline
removed another bunch of global variables