Added getPerim and supporting files.