Fixing bugs on model boundary computation. Adding code for paramaterizing by mapping the boundary into a square.