Move non javascript code in the right block (IRV)
Small cleanups