On numerical treatment of free surfaces for incompressible fluid-flow problems