refactoring, fixes

 * removed ack/nack handler
 * made it actually work without race conditions