My refactoring after SanSanych
Some minor fix