added doc and bonus fix for generated quantities to initialize vars