fixed LaTeX errors, cleaned up figures

Several LaTeX errors, such as overfull \hbox,
were fixed.

The formatting of sections and figures was improved to
keep figures in their respective \sections.