Neutron spin-handling devices that employ time-dependent magnetic fields are very frequently used in different polarized neutron instruments. We have developed a new VITESS module that allows us to calculate the neutron spin dynamics in a time-dependent magnetic field, time dependent both in direction and in magnitude.Neutron beam focusing by means of a neutron refractive optic principally allows for a very significant enhancement of neutron flux at the sample position of the small-angle scattering instruments. Presently, there is no possibility to simulate the performance of such neutron refractive optical elements. The new VITESS module for the simulation of spherical and parabolic neutron refractive lenses enables the inclusion of a sequence of neutron lenses (the compound lens), and it takes into account the gravity effects and is conveniently supplied with the trajectory visualization option.