Function signatures.
Change export names.
Fix distance-to-point calculation.
Minimum heiht is 2.