Removing extra output statements