Separating larger functions into sfsw_shape.c