refactored the dk table service into a lib
major refactor/reorg
unecessary lock
little betterings