Fixes for freeing memory and arbitrary number of points