Add cleanParams function and call it when extract and export