Squashed bugs and changed output to pdfs