Regularity of the Free Boundary in Bernoulli-Type Problems