Gauge invariance of systems whose Hamilton-Jacobi equation is separable is
improved by adding surface terms to the action functional. The general form
of these terms is given for some complete solutions of the Hamilton-Jacobi
equation. The procedure is applied to the relativistic particle and toy un
iverses, which are quantized by imposing canonical gauge conditions in the
path integral; in the case of empty models, we first quantize the parametri
zed system called "ideal clock," and then we examine the possibility of obt
aining the amplitude for the minisuperspaces by matching them with the idea
l clock. The relation existing between the geometrical properties of the co
nstraint surface and the variables identifying the quantum states in the pa
th integral is discussed.