Fixed a huge amount of circular references.