Consolidated area and total perimeter update functions, since they were only ever called together.