Fix short breaks counting

Signed-off-by: Carlo Caione <carlo@caione.org>
Code refactoring

Signed-off-by: Carlo Caione <carlo@caione.org>