Clean up logging. Remove deprecated code. Fix ACK'ing problem.