Improvements in the theory of ship motions in longitudinal waves