Added pdf writing functionality. Basic reports creation implemented