Some refactoring
MAJ for demo with timeout in ping