Move some CL calls outside of main loop