The ab initio multiple spawning (AIMS) method has been developed to solve the electronic and nuclear Schrodinger equations simultaneously for application to photochemical reaction dynamics. We discuss some details of the implementation of AIMS in the M olpro program package. A few aspects of the implementation are highlighted, including a new multiple timescale integrator and a scheme for solving the coupled-perturbed multiconfiguration self-consistent field (CP-MCSCF) equations in the context of ab initio molecular dynamics. The implementation is very efficient and we demonstrate calculations on the photoisomerization of ethylene using more than 5000 trajectory basis functions. We have included the capability for hybrid quantum mechanics/molecular mechanics (QM/MM) simulations within AIMS, and we investigate the role of an argon solvent in the photoisomerization of ethylene. Somewhat surprisingly, the surrounding argon has little effect on the timescale of non-adiabatic quenching in ethylene.