Added basic LaTeX generation, better file identifiers.