Refactor Castor connector to use Portability.
Restructure Castor connector.