cleanup and renaming of postgres interface