Code review feedback - initialise variables in a consistent place
Rename self.last_line to self.previous_line for clarity