Changed names of read and write pointers.
Updated name for receive buffer pointers. Added logic for the receive buffer counter.