Implementend automatic print and email functionality. Still open for
tests.