Adding relations to Optimization API

Done and deployed this feature!

See the full progress of the Optimization API here