edits throughout, and cleaned up some md issued that resulted in errors in the coverted tex file - note that there are still errors in the tex, but moving the \label{...} outside of the \caption{...} environment cleaned them up - I'm not sure why pandoc does that, \label should be in the figure environment but outside of \caption{...}