Refactor and fix retransmission
Add documentation page