Updates to format and adding code to appendices.