Code style
closes #11 Refactor discovery protocol