Move all inline code to external scripts to allow for strict CSP without unsafe-inline option