Minor changes

Replace BasicHandler with ProducerImpl and ConsumerImpl in constructors of
respective Threads. Rename some variables in class definitions.