Fixed two bugs, changed long lines, some automatic formatting.

Bugs:
    self.debug was always False
    << does not work with print *function*