Add comments about CSP and some explanation why we build dynamic function here