Restructure Castor connector.