refactored dataaccess layer
enhanced config handling