removed not needed typename
code cleanup, added support for line/triangle contacts