fixed ugly clearBuffer implementation.  added note to self.
change clearBuffer to clear_buffer to keep case convention consistent.