update to work with lates GHC, relax CSP policy,  add withContext-like for DB and PM