merge in a few updates from the newton-dynamics master