more adaption work to remove postgresql dependencies, cleanup