small package modularizing code to get wim sites from couchdb and postgresql