moving state to inside CL.java
attempted porting SCR
BROKEN some untested changed.