Getting around dependency cycle errors