Fixes #10. changed the way the pdf is served in app.js and the generation of the latex/pdf files in aimpl.cls and latex.ejs