Added includegraphics for png, jpg, and pdf.  Some refactoring.