Improvments
- Latch state wasn't computed correctly because of missing parenthesis
- Code style