Added triangle visibility check.
Minor fixups.