Refactored the refine_sand_profile function.
The model is now handeled by a separate class to speed up processing