Added support for theorems and rewrote itemize and enumerate sections