Small data scattering for nonlinear Schrödinger wave and Klein-Gordon equations