Adds caching to inverseFor and implements look for inverses on the other side

We don't seem to follow line lengths for asserts. Should we start?