Integrate vulnerability

This PR resolves the nested functions that were causing issues for firefox