Move stuff to components to break the circular dependency