code reorganized for modularized sinks and upcoming improved class dependencies