Split connector and partition code into separate files for simplicity.