Made gcc happy. Added some parens, fixed all printing commands.