implemented a number of ideas put forward by nikhan

mostly this makes Consume and Produce use a similar mechanism. Also tidies up pointless code and cleans up docstrings.