OCELOT has been developed as a multiphysics simulation tool for FEL and synchrotron light source studies. Inthis work we highlight recent code developments focusing on electron tracking in linacs taking into account collectiveeffects and on x-ray optics calculations.