more cleanups. TODO: whitelist/blacklist db. TODO: logs.