Added adjustments for area reduction due to subsurfaces
Reduced number of calls to realloc() when loading from stdin