Added more test cases for triangle deserialization. Cleaned test code a little.