Mathematical modelling of nonlinear waves of moderate amplitude in single- and two-layer fluids