Improvements and testing of the verlet.c functions