Added output.
Fixed minor errors.