cleaning up some redundant calls; adding cache option for triangle files.