Fix carmo and trinity

[Diff is terrible because \r characters got removed]

Tried to fix #100 but found out it was already fixed a long time ago.

Ended up adding documentation and a few unit tests.