add function and button to save headers in JSON. Created a Frame to group buttons. Better documented the code