Timeout timer and minor fixes

- Add timeout timer for transmissions (TIM7)
- Some minor optimizations and code style changes
- Documentation fix (timeouts)