Refactored offset handling.
Handle case of commit offset being <= 0.
Fixed deps.
Handle timeout more gracefully.