Output is now sent to stdout. minor changes