Completed Code and Figures