Added output and storing of corresponding block

Problems: Output doesn't appear to be there but it is, the inputs aren't
properly decrementing