various refactoring to use more current derby style in sink