Refactored d3 table drawer into separate factory.