Changed name of binary
Tidied up formatting
Added randomization of input and robust first triangle selection.