Freesurface implementation

comments please!